---
title: Injured body-part maintenance
summary: Maintains injured body parts for a claim and propagates the primary body part to the injury claim.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Business.Claim
reference_type: embedded
operation_id: injured-body-part
trigger: Caller creates, updates, or deletes an injured body part on a claim
---

# Injured body-part maintenance

Maintains the set of injured body parts recorded against a claim, enforces that exactly one body part is marked primary, and propagates the primary body part to the parent injury-claim record.

| Field | Value |
| --- | --- |
| **Operation ID** | injured-body-part |
| **Trigger** | Caller creates, updates, or deletes a `clsWorkerInjuredBodyPart`, or clears fields via `UpdateClaimBodyPart` |
| **Inputs** | ClaimID, BodyPartCode, BodyPartSideCode, PrimaryIndicator, InjuryNatureCode |
| **Outputs** | Injured body-part rows; propagated `CL_INJURY_CLAIM` columns |
| **Primary components** | `clsWorkerInjuredBodyPart.UpdateClaimBodyPart`, `clsWorkerInjuredBodyPartCollection` |
| **Entry point** | SAIF.Business.Claim/clsWorkerInjuredBodyPart.vb |

## Steps

1. Retrieve injured body parts for the claim into the collection ([SQL-036](../sql/SQL-036.md), [CL_WORKER_INJURED_BODY_PART](../database-tables.md#cl_worker_injured_body_part)).
2. Collection-level rule checks run over all rows:
   - When `Validate` is `True`: exactly one primary body part is required ([BR-006](../business-rules.md#br-006-primary-body-part-is-required)).
   - Always evaluated (not gated by `Validate`): only one primary body part is allowed ([BR-007](../business-rules.md#br-007-only-one-primary-body-part-is-allowed)).
3. Insert or update the injured body-part row ([SQL-008](../sql/SQL-008.md) insert, [SQL-050](../sql/SQL-050.md) update, [CL_WORKER_INJURED_BODY_PART](../database-tables.md#cl_worker_injured_body_part)).
4. `UpdateClaimBodyPart([inClearFields])`:
   - When the object is dirty and `IsPrimary` is `True`: propagate the primary body part, side, and injury nature to `CL_INJURY_CLAIM` ([SQL-051](../sql/SQL-051.md), [CL_INJURY_CLAIM](../database-tables.md#cl_injury_claim)).
   - When `inClearFields = True`: reset those injury-claim fields to zero/space instead of propagating values.
5. Delete an injured body-part row when requested ([SQL-062](../sql/SQL-062.md), [CL_WORKER_INJURED_BODY_PART](../database-tables.md#cl_worker_injured_body_part)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Retrieve injured body parts]) --> Validate{Validate collection rules}
	Validate --> Primary{Primary required and unique?}
	Primary -->|Fails| ErrRule([Broken rule: save blocked])
	Primary -->|Passes| Save[Insert/Update body part row]
	Save --> IsPrimary{IsDirty AND IsPrimary?}
	IsPrimary -->|Yes| Propagate[Update CL_INJURY_CLAIM<br>primary body part/side]
	IsPrimary -->|No| Skip([No propagation])
	Propagate --> ClearCheck{inClearFields = True?}
	ClearCheck -->|Yes| Clear["Reset injury-claim fields to<br>zero/space"]
	ClearCheck -->|No| Keep([Propagated values retained])
```

## Failure and edge-case behavior
- A missing or duplicate primary body part blocks save via [BR-006](../business-rules.md#br-006-primary-body-part-is-required) / [BR-007](../business-rules.md#br-007-only-one-primary-body-part-is-allowed).
- `clsWorkerInjuredBodyPart.Criteria.CreateSQL` and `.RetrieveSQL` return `String.Empty` rather than throwing, unlike other unsupported criteria properties in this library.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- SAIF.Business.Claim/clsWorkerInjuredBodyPart.vb
- SAIF.Business.Claim/clsWorkerInjuredBodyPartCollection.vb
